package com.nes.springcloud.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by wdq on 17-6-1.
 */
//指定服务
@FeignClient(value = "eureka-client-1",fallback = ComputeClientHystrix.class)
public interface ComputeClient {

    //此处注意：其中的参数必须使用RequestParam注明
    @RequestMapping(value = "eureka/add",method = RequestMethod.GET)//GetMapping
    String getResult(@RequestParam(name = "a") Integer a,@RequestParam(name = "b") Integer b);
}
